<template>
  <div class="world">
    <div class="errMessage">
      <span><i class="iconfont icon-404"></i>,网址输入有误</span>
    </div>
    <div class="btn">
      <el-button type="primary" @click="goHome">{{ token ? '返回首页' : '返回登录'}}</el-button>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name:'Page404',
  computed: {
    ...mapGetters(['token']),
  },
  methods: {
    goHome() {
      this.$router.push({ path: this.token ? '/' : '/login' })
    }
  }
}
</script>

<style lang='less' scoped>
  .world {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    .errMessage {
      font-size: 24px;
      font-style: italic;
      i {
        font-size: 24px;
      }
    }
    .btn {
      margin-top: 32px;
    }
  }
</style>